<!DOCTYPE html>
<html lang="en" style="height: 100%">
<head>
    <meta charset="UTF-8">
    <title>无忧保险CRM系统</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <script src="js/lib/jquery-1.10.2.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="bootstrap/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>

    <style>
        .top {
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 1px 5px rgba(57,57,57,0.075);
            background: #1570A6;
            margin: 0 auto;
            height: 15%;

        }
        .logo {
            height: 85px;
            width: 180px;
            font-size: 30px;
            color: white;
            text-align: center;
            line-height: 85px;
            margin-left: 30px;
            float: left;
            font-weight: 700;
        }
        .top_right {
            float: right;
            line-height: 85px;
        }
        .top_right>div {
            float: left;
        }
        .tips {
            padding: 0 30px;
            font-size: 20px;
            color: white;
        }
        .user {

        }
        .user>img {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            vertical-align: middle;
        }
        .user>span {
            padding: 0 10px;
            color: white;
        }

        .menu_title {
            background: #2B333E;
            color: #fff;
            padding: 11px 0px;
            border-radius: 5px;
            text-align: center;
            font-size: 14px;
        }
        .menu_main {
            display: flex;
            margin-top: 10px;
        }
        .menu_left {
            flex: 1;
            background: #2B333E;
            color: #637381;
        }
        .menu_left>ul {
            list-style: none;
            padding: 0 !important;

        }
        .menu_left>ul>li {
            width: 100%;
            text-align: center;
            padding: 10px 0;
            cursor: pointer;

        }
        .menu_right {
            flex: 3;
            background: #323a45;
        }

        .menu_right>ul {
            padding: 0;
            list-style: none;
            color: white;
            text-align: center;
        }
        .menu_right>ul>li {
            padding: 12px 0;
            cursor: pointer;
        }

        .select1 {
            border-left: 3px solid #1E9FFF;
            color: #f5f5f5;
            background: #323a45;
        }
        .select2 {
            border-left: 3px solid #1E9FFF;
            color: #ffffff;
            background-color: #37424f;

        }

        .menu_path {
            height: 50px;
            border-bottom: 1px solid #ddd;
            ine-height: 40px;
            background-color: #f4f6f9;
            padding-left: 20px;
            font-size: 20px;
            color: #93D1FF;
            line-height: 50px;
            cursor: pointer;
        }
        .menu_path:hover {
            color: #1E9FFF;
        }
        .but-logon{
            padding: 0;
            width: 45px;
            height: 35px;
            /*position: relative;*/
            /*top:52px;*/
            /*right: 50px;*/
            line-height: 35px;

        }

    </style>
</head>
<body style="height: 100%;">
    <div class="top">
        <div class="logo">无忧保险</div>
        <div class="top_right">
            <div class="tips">
                <span class="glyphicon glyphicon-bell" aria-hidden="true"></span>
            </div>
            <div class="user">
                <img src="img/usreicon_40.png" alt="">
                <span id="u-name">登录</span>
            </div>
            <input class="but-logon" type="button" value="注销">

        </div>

    </div>
    <div class="container-fluid" style="height: 80%">
        <div class="row" style="height: 100%">
            <div class="col-md-2" STYLE="background: #37424F;height: 100%;overflow-y: auto">
                <div class="menu_title">
                    <span class="glyphicon glyphicon-home" aria-hidden="true"></span>
                    首页
                </div>
                <div class="menu_main" style="">
                    <div class="menu_left">
                        <ul>
                            <li class="select1" link-menu="often">
                                <span class="glyphicon glyphicon-th" aria-hidden="true"></span>
                                <br>
                                <span>常用</span>
                            </li>
                            <li  link-menu="crm">
                                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                                <br>
                                <span>CRM</span>
                            </li>
                            <li link-menu="office">
                                <span class="glyphicon glyphicon-blackboard" aria-hidden="true" ></span>
                                <br>
                                <span>办公</span>
                            </li>
                            <li link-menu="finance">
                                <span class="glyphicon glyphicon-yen" aria-hidden="true"></span>
                                <br>
                                <span>财务</span>
                            </li>
                            <li  link-menu="statistics">
                                <span class="glyphicon glyphicon-signal" aria-hidden="true"></span>
                                <br>
                                <span>统计</span>
                            </li>
                            <li link-menu="more">
                                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                                <br>
                                <span>更多</span>
                            </li>
                        </ul>
                    </div>
                    <div class="menu_right">
                        <ul class="often">
                            <li class="select2">
                                <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                <span class="showPage">代办任务</span>
                            </li>
                            <li class="toPage" pageName="connection">
                                <span class="glyphicon glyphicon-check" aria-hidden="true"></span>
                                <span class="showPage">联系跟进</span>
                            </li>
                            <li class="toPage" pageName="allCustomer">
                                <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                <span class="showPage">全部客户</span>
                            </li>
                            <li class="toPage" pageName="transferCustomer">
                                <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>
                                <span class="showPage">转让客户</span>
                            </li>
                            <li class="toPage" pageName="potentialCustomer">
                                <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>
                                <span class="showPage">潜在客户</span>
                            </li>
                            <li class="toPage" pageName="myCustomer">
                                <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                <span>我的客户</span>
                            </li>
                            <li class="toPage" pageName="publicCustomer">
                                <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                <span class="showPage">公共客户</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                <span class="showPage">合同管理</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
                                <span class="showPage">成交订单</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                <span class="showPage">回款管理</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-usd" aria-hidden="true"></span>
                                <span class="showPage">费用收支</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                                <span class="showPage">客户投诉</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                <span class="showPage">销售机会</span>
                            </li>
                            <li>
                                <span class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                <span class="showPage">客户关怀</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="col-md-10" style="padding: 0;height: 100%"  >
                <iframe style="width:100%;height:100%" id="f" src="" frameborder="0"></iframe>
            </div>
        </div>
    </div>
</body>
<script>
    $(function () {



        $("#u-name").html(getUrlstr("name"))

        //截取url后面的参数
        function getUrlstr(str){
            var reg = new RegExp("(^|&)" + str + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return decodeURI(r[2])
            }
            return null;
        }

        $(".but-logon").click(function () {
            $.cookie("username",null)
            $.cookie("password",null)
            location.href="html/login.html"
        })










        //一级菜单
        $(".menu_left").on("click", "li", function () {
            //选择左侧菜单
            $(this).parent().children().removeClass("select1")
            $(this).addClass("select1")
            //展示右侧菜单详情
            $(".menu_right>ul").hide()
            var link_menu = $(this).attr("link-menu")
            console.log(link_menu)
            $("."+link_menu).show()
        })

        //二级菜单选择
        $(".menu_right").on("click", "li", function () {
            //选择左侧菜单
            $(this).parent().children().removeClass("select2")
            $(this).addClass("select2")
        })

        //展示右侧详情
        $(".showPage").on("click", function () {
            //获取一级菜单名称
            var menu1 = $(".select1>span:eq(1)").html()
            var menu2 = $(".select2>span:eq(1)").html()

        })

        $(".toPage").on("click", function () {
            var page = $(this).attr("pageName")
            var url = "./html/"+page+".html"
            $("#f").attr("src",url)
        })



    })
</script>
</html>














